function [primaryPathTable, backupPathTable1, backupPathTable2, path] = calculatePrimaryBackupPath (source ,destination, disp_loc, matrix)
    
    [primaryPathTable, path] = drawTheMainPath(source ,destination, disp_loc, matrix);%To get almost the shortest primary path.
    toc;
    if path == 1
         [backupPathTable1, backupPathTable2] = drawTheBackupPath(primaryPathTable, disp_loc, matrix);
    else
        primaryPathTable = 0;
        backupPathTable1 = 0;
        backupPathTable2 = 0;
    end

end